﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Battle.AbilityBehavior
{
    public class AttachEffect : IAbilityBehavior
    {
        private IEffect effect;

        public AttachEffect(IEffect effect)
        {
            this.effect = effect;
        }

        public void Apply(IEntity speller, IEnumerable<IEntity> targets)
        {
            foreach (var target in targets)
            {
                effect.Owner = target;
                target.AddEffect(effect);
            }
        }
    }
}
